<link rel="stylesheet" href="/styles/thickbox.css" />
<script type="text/javascript" src="/scripts/thickbox.js"></script>
<div id="blockContIn">
<table border="0" cellspacing="0" cellpadding="0" align="left">
  <tr>
    <td valign="top"><div class="Col">
	<tal:block tal:content="structure php: this.partial('index/myactivityview.html')"/>
</div></td>
	<td valign="top" width="100%"><div class="ColExp">
<div class="ModuleBlock" style="height:1020px">
<h1>
<label>Messages</label>
<div><a href="/expressions/index/anonymous/5"><img src="/images/SettingsIcon.png" border="0" alt="Settings" title="Settings" align="top" class="SetIcon"/></a></div>
<!--<div class="wid186"><input type="text" value="search" /><a href="#"><img src="/images/ModSearchIcon.png" border="0" class="SerImg" /></a></div> -->	
</h1>
<div class="clear"></div>
<ul class="ModuleMenu">
<?php if($ctx->type == 1) {  ?>
<li><a href="/expressions/index/inbox/1" class="active">Inbox</a> </li>
<?php } else if($ctx->type == 2) {  ?>
<li><a href="/expressions/index/sent/2" class="active">Sent</a> </li>
<?php } else if($ctx->type == 3) {  ?>
<li><a href="/expressions/index/drafts/3" class="active">Draft</a> </li>
<?php } else if($ctx->type == 4) {  ?>
<li><a href="/expressions/index/trash/4" class="active">Trash</a> </li>
<?php } else if($ctx->type == 5) {  ?>
<li><a href="/expressions/index/anonymous/7" class="active">Anonymous</a> </li>
<?php } else if($ctx->type == 6) {  ?>
<li><a href="/expressions/index/block/7" class="active">Block</a> </li>
<?php } else if($ctx->type == 7) {  ?>
<li><a href="/expressions/index/groups/7" class="active">Groups</a> </li>
<?php } ?>
</ul>
<div class="clear hig20"></div>

<div style="display: none;">
		<div id="inline1" style="width:600px; min-height:500px; padding:10px 10px;">
		<div class="PopUp">
		<p class="Title">Compose</p>
		<div id="Compose">
		<div class="pad_123">
		<div class="EmoType Fleft">
		<strong class="Fleft pad_t8">Emotion Type</strong>
		<ul>
		<li><a href="#"><img src="/images/Emot_1.png" border="0" alt="Anger" title="Anger" /></a></li>
		<li><a href="#"><img src="/images/Emot_2.png" alt="Anticipation" title="Anticipation" /></a></li>
		<li><a href="#"><img src="/images/Emot_3.png"  alt="Fear" title="Fear"/></a></li>
		<li><a href="#"><img src="/images/Emot_4.png" alt="Joy" title="Joy" /></a></li>
		<li><a href="#"><img src="/images/Emot_5.png" alt="Suprise" title="Suprise" /></a></li>
		<li><a href="#"><img src="/images/Emot_6.png" alt="Sadness" title="Sadness" /></a></li>
		<li><a href="#"><img src="/images/Emot_7.png" alt="Love" title="Love" /></a></li>
		</ul>
		</div>
		<div class="Fleft pad_115"><img src="/images/IntensityImg.gif" /></div>
		<div class="clear"></div>
		</div>
		<div class="pad_t8">
		<label>To</label><input type="text" />
		<div class="clear"></div>
		</div>
		<div class="pad_t8">
		<label>Subject</label><input type="text" />
		<div class="clear"></div>
		</div>
		<div class="pad_t8">
		<label>Attachment</label><input type="file" />
		<div class="clear"></div>
		</div>
		<div class="pad_t8">
		<label>Audio</label><input type="radio" border="0" align="left" style="width:15px; border:0;" />
		<div class="clear"></div>
		</div>
		<div class="pad_t8">
		<label>Message</label><textarea></textarea>
		<div class="clear"></div>
		</div>
		<div class="pad_t8 pad_1108">
		<a class="Button" href="#"><span>Preview</span></a><a class="Button" href="#"><span>Send</span></a><a class="Button" href="#"><span>Save as Draft</span></a>
		<p class="Fleft pad_115 pad_t5"><input type="checkbox" border="0" align="left" style="width:15px;border:0;" class="pad_115"/>&nbsp;<span class="txt_sm">Send as Anonymous</span> </p>
		</div>
		<div class="clear"></div>
		</div>
		</div>
		
		</div>
	</div>
	
<div class="ListWid">
<div class="blkCont" id="listContent">
		<?php if(is_array($ctx->getExpressions['result']) && count($ctx->getExpressions['result'])>0) { ?>
		
			<tal:block tal:content="structure php: this.partial('/index/message.html')"/>
		
		<? } else { ?>
		
			<strong>no expressions</strong>
		
		<? } ?>
</div>
</div>

<!-- View start here -->

<div class="wid63per">

</div>

<!-- View End here -->


<div class="clear"></div>
</div>
</div></td>
<td valign="top">
<div class="ColBanner">
<div class="ModuleBlock">
<img src="/images/Gads.gif" /><img src="/images/Gads.gif" /></div>
</div></td>	
  </tr>
</table>





<div class="clear"></div>
</div>

<script type="text/javascript">
//<![CDATA[

function changeStatustoClose(val,action)
{
	$.ajax({
			   type: "POST",
			   dataType: "json",
			   data: "val="+val+"&tpye="+action+"&msgType=<?php echo $ctx->type;?>&view=1",
			   url: "/expressions/index/change-status/",
			    success: function(data){
					if(data.view == 1)
					{
						window.location = "/expressions/index/inbox/1";
					} else if(data.view == 2) {
						window.location = "/expressions/index/sent/2";				
					} else if(data.view == 3) {
						window.location = "/expressions/index/drafts/3";
					} else if(data.view == 4) {
						window.location = "/expressions/index/trash/4";
					}else if(data.view == 5) {
						window.location = "/expressions/index/anonymous/5";
					} else {
						location.reload();
					}
				}
			});
}
function sendexpression(val)
{
	tb_show('Draft Send','/expressions/index/reply?&val='+val+'&type=draft&height=450&width=620','');
	//window.location = '/expressions/index/reply?&val='+val+'&type=draft';
}
function reply(val,email)
{
	//alert(val);return false;
	tb_show('Reply','/expressions/index/reply?&val='+val+'&email='+email+'&height=480&width=650','');
}
function addtogroup(val) 
{ 
		//alert($("#group").val());return false;
		var getVal = $("#group").val();
	$.ajax({
			type: "POST",
			dataType: "json",
			data: "val="+getVal+"&userId=<?php echo @$ctx->details['user_id']?>",
			//alert(a);return false;
			url: "/expressions/index/addtogroup/",
			success: function(data){
			//alert(data.output);return false;
					if(data.output==1)
					{
					alert('Email Id added to group successfully');
					}
					else
					{
					alert('email Id already exist in this group')
					}
					location.reload();					
				}
		}); 
} 
function changeStatusFavorite(trigger_id,status)
{
	//alert(trigger_id+"and"+status);return false;
	$.ajax({
			   
			    type: "POST",
				dataType: "json",
			    data: "trigger_id="+trigger_id+"&status="+status+"&type=expressions",
			    url: "/triggers/index/favorite/",
			    success: function(data){
					location.reload();					
				}
			});
}
	
//]]>
</script>

